package voloshyn.paliy.camera;

import java.nio.ByteBuffer;
import java.nio.ByteOrder;

public class MathUtils {
	public static byte[] my_int_to_bb_le(int myInteger) {
		return ByteBuffer.allocate(4).order(ByteOrder.LITTLE_ENDIAN)
				.putInt(myInteger).array();
	}

	public static int my_bb_to_int_le(byte[] byteBarray) {
		return ByteBuffer.wrap(byteBarray).order(ByteOrder.LITTLE_ENDIAN)
				.getInt();
	}
}
